/*
 * Copyright 2011-2021 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0.
 * See `LICENSE` in the project root for license information.
 */

package me.ijleex.jmh.benchmark.counter.impl;

import me.ijleex.jmh.benchmark.counter.Counter;

/**
 * DirectVolatileCounter.
 *
 * @author liym
 * @since 2020-05-27 12:14 新建
 */
public class DirectVolatileCounter implements Counter {

    private volatile long counter;

    @Override
    public void increment() {
        ++this.counter;
    }

    @Override
    public long getCount() {
        return this.counter;
    }

}
